package com.example.nacos.provider.controller;

import com.example.nacos.provider.model.Order;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @ClassName : OrderController
 * @Description : 订单测试类
 * @Author : tianshuo
 * @Date: 2021-03-23 10:37
 */
@RestController
public class OrderController {

    private static final Logger logger = LoggerFactory.getLogger(UserController.class);


    @RequestMapping("/order/{id}")
    public Order order(@PathVariable("id") Integer id) {
        logger.info("invoke order : {}", id);
        return new Order(id, "30001订单", "交通局");
    }

}

